package com.xiaotu.common.model;

import org.apache.commons.lang3.StringUtils;

import com.xiaotu.common.util.SepratorUtil;
public class MaoYanMovieSupplementBasicInfoModel {

	private String id = null;//主键
	private String dataid = null;//网站电影id
	private String tvname = null;//电影名称
	private String [] directorArr;//导演
	private String director;
	private String [] actorArr;//主演
	private String actor;//主演
	private String [] actorRoleArr;//饰演角色
	private String actorRole;//饰演角色
	private String [] productionCompanyArr;//制作公司
	private String productionCompany;//制作公司
	private String [] issueCompanyArr;//出品公司
	private String issueCompany;//出品公司
	private String [] jointIssueCompanyArr;//联合出品公司
	private String jointIssueCompany;//联合出品公司
	private String [] publishCompanyArr;//发行公司
	private String publishCompany;//发行公司
	private String [] jointPublishCompanyArr;//联合发行公司
	private String jointPublishCompany;//联合发行公司
	private String [] propagandaCompanyArr;//宣传公司
	private String propagandaCompany;//宣传公司
	private String [] marketCompanyArr;//营销公司
	private String marketCompany;//营销公司
	private String [] posterProductionCompanyArr;//海报制作公司
	private String posterProductionCompany;//海报制作公司
	private String [] trailerProductionCompanyArr;//预告片制作公司
	private String trailerProductionCompany;//预告片制作公司
	private String [] otherCompanyArr;//其他公司
	private String otherCompany = null;//其他公司
	private String introduction = null;//影片简介
	private Integer status = null;//0:上线 1:下线
	private Integer supplement = null;//0:未补充 1:以补充
	private String onlineDate = null;//上线日期
	private String offlineDate = null;//下线日期
	private String collecttime = null;//采集时间
	private String englishName = null;//英文名
	private String [] labelArr;//类型
	private String label;//类型
	private String [] areaArr;//地区
	private String area;//地区
	private String timeLength = null;//时长
	private String playType = null;//播放类型
	private String showingArea = null;//上映地区
	private String showingDate = null;//上映时间
	
	public MaoYanMovieSupplementBasicInfoModel(String id, String dataid, String tvname, String[] directorArr,
			String[] actorArr, String[] actorRoleArr, String[] productionCompanyArr, String[] issueCompanyArr,
			String[] jointIssueCompanyArr, String[] publishCompanyArr, String[] jointPublishCompanyArr,
			String[] propagandaCompanyArr, String[] marketCompanyArr, String[] posterProductionCompanyArr,
			String[] trailerProductionCompanyArr, String[] otherCompanyArr, String introduction, Integer status,
			Integer supplement, String onlineDate, String offlineDate, String collecttime, String englishName,
			String[] labelArr, String[] areaArr, String timeLength, String playType, String showingArea,
			String showingDate) {
		super();
		this.id = id;
		this.dataid = dataid;
		this.tvname = tvname;
		this.directorArr = directorArr;
		this.director = convertStringArray(directorArr);
		this.actorArr = actorArr;
		this.actor = convertStringArray(actorArr);
		this.actorRoleArr = actorRoleArr;
		this.actorRole = convertStringArray(actorRoleArr);
		this.productionCompanyArr = productionCompanyArr;
		this.productionCompany = convertStringArray(productionCompanyArr);
		this.issueCompanyArr = issueCompanyArr;
		this.issueCompany = convertStringArray(issueCompanyArr);
		this.jointIssueCompanyArr = jointIssueCompanyArr;
		this.jointIssueCompany = convertStringArray(jointIssueCompanyArr);
		this.publishCompanyArr = publishCompanyArr;
		this.publishCompany = convertStringArray(publishCompanyArr);
		this.jointPublishCompanyArr = jointPublishCompanyArr;
		this.jointPublishCompany = convertStringArray(jointPublishCompanyArr);
		this.propagandaCompanyArr = propagandaCompanyArr;
		this.propagandaCompany = convertStringArray(propagandaCompanyArr);
		this.marketCompanyArr = marketCompanyArr;
		this.marketCompany = convertStringArray(marketCompanyArr);
		this.posterProductionCompanyArr = posterProductionCompanyArr;
		this.posterProductionCompany = convertStringArray(posterProductionCompanyArr);
		this.trailerProductionCompanyArr = trailerProductionCompanyArr;
		this.trailerProductionCompany = convertStringArray(trailerProductionCompanyArr);
		this.otherCompanyArr = otherCompanyArr;
		this.otherCompany = convertStringArray(otherCompanyArr);
		this.introduction = introduction;
		this.status = status;
		this.supplement = supplement;
		this.onlineDate = onlineDate;
		this.offlineDate = offlineDate;
		this.collecttime = collecttime;
		this.englishName = englishName;
		this.labelArr = labelArr;
		this.label = convertStringArray(labelArr);
		this.areaArr = areaArr;
		this.area = convertStringArray(areaArr);
		this.timeLength = timeLength;
		this.playType = playType;
		this.showingArea = showingArea;
		this.showingDate = showingDate;
	}
	public MaoYanMovieSupplementBasicInfoModel() {
		super();
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getDataid() {
		return dataid;
	}
	public void setDataid(String dataid) {
		this.dataid = dataid;
	}
	public String getTvname() {
		return tvname;
	}
	public void setTvname(String tvname) {
		this.tvname = tvname;
	}
	public String[] getDirectorArr() {
		return directorArr;
	}
	public void setDirectorArr(String[] directorArr) {
		this.directorArr = directorArr;
		this.director = convertStringArray(directorArr);
	}
	public String getDirector() {
		return director;
	}
	public void setDirector(String director) {
		this.director = director;
	}
	public String[] getActorArr() {
		return actorArr;
	}
	public void setActorArr(String[] actorArr) {
		this.actorArr = actorArr;
		this.actor = convertStringArray(actorArr);
	}
	public String getActor() {
		return actor;
	}
	public void setActor(String actor) {
		this.actor = actor;
	}
	public String[] getActorRoleArr() {
		return actorRoleArr;
	}
	public void setActorRoleArr(String[] actorRoleArr) {
		this.actorRoleArr = actorRoleArr;
		this.actorRole = convertStringArray(actorRoleArr);
	}
	public String getActorRole() {
		return actorRole;
	}
	public void setActorRole(String actorRole) {
		this.actorRole = actorRole;
	}
	public String[] getProductionCompanyArr() {
		return productionCompanyArr;
	}
	public void setProductionCompanyArr(String[] productionCompanyArr) {
		this.productionCompanyArr = productionCompanyArr;
		this.productionCompany = convertStringArray(productionCompanyArr);
	}
	public String getProductionCompany() {
		return productionCompany;
	}
	public void setProductionCompany(String productionCompany) {
		this.productionCompany = productionCompany;
	}
	public String[] getIssueCompanyArr() {
		return issueCompanyArr;
	}
	public void setIssueCompanyArr(String[] issueCompanyArr) {
		this.issueCompanyArr = issueCompanyArr;
		this.issueCompany = convertStringArray(issueCompanyArr);
	}
	public String getIssueCompany() {
		return issueCompany;
	}
	public void setIssueCompany(String issueCompany) {
		this.issueCompany = issueCompany;
	}
	public String[] getJointIssueCompanyArr() {
		return jointIssueCompanyArr;
	}
	public void setJointIssueCompanyArr(String[] jointIssueCompanyArr) {
		this.jointIssueCompanyArr = jointIssueCompanyArr;
		this.jointIssueCompany = convertStringArray(jointIssueCompanyArr);
	}
	public String getJointIssueCompany() {
		return jointIssueCompany;
	}
	public void setJointIssueCompany(String jointIssueCompany) {
		this.jointIssueCompany = jointIssueCompany;
	}
	public String[] getPublishCompanyArr() {
		return publishCompanyArr;
	}
	public void setPublishCompanyArr(String[] publishCompanyArr) {
		this.publishCompanyArr = publishCompanyArr;
		this.publishCompany = convertStringArray(publishCompanyArr);
	}
	public String getPublishCompany() {
		return publishCompany;
	}
	public void setPublishCompany(String publishCompany) {
		this.publishCompany = publishCompany;
	}
	public String[] getJointPublishCompanyArr() {
		return jointPublishCompanyArr;
	}
	public void setJointPublishCompanyArr(String[] jointPublishCompanyArr) {
		this.jointPublishCompanyArr = jointPublishCompanyArr;
		this.jointPublishCompany = convertStringArray(jointPublishCompanyArr);
	}
	public String getJointPublishCompany() {
		return jointPublishCompany;
	}
	public void setJointPublishCompany(String jointPublishCompany) {
		this.jointPublishCompany = jointPublishCompany;
	}
	public String[] getPropagandaCompanyArr() {
		return propagandaCompanyArr;
	}
	public void setPropagandaCompanyArr(String[] propagandaCompanyArr) {
		this.propagandaCompanyArr = propagandaCompanyArr;
		this.propagandaCompany = convertStringArray(propagandaCompanyArr);
	}
	public String getPropagandaCompany() {
		return propagandaCompany;
	}
	public void setPropagandaCompany(String propagandaCompany) {
		this.propagandaCompany = propagandaCompany;
	}
	public String[] getMarketCompanyArr() {
		return marketCompanyArr;
	}
	public void setMarketCompanyArr(String[] marketCompanyArr) {
		this.marketCompanyArr = marketCompanyArr;
		this.marketCompany = convertStringArray(marketCompanyArr);
	}
	public String getMarketCompany() {
		return marketCompany;
	}
	public void setMarketCompany(String marketCompany) {
		this.marketCompany = marketCompany;
	}
	public String[] getPosterProductionCompanyArr() {
		return posterProductionCompanyArr;
	}
	public void setPosterProductionCompanyArr(String[] posterProductionCompanyArr) {
		this.posterProductionCompanyArr = posterProductionCompanyArr;
		this.posterProductionCompany = convertStringArray(posterProductionCompanyArr);
	}
	public String getPosterProductionCompany() {
		return posterProductionCompany;
	}
	public void setPosterProductionCompany(String posterProductionCompany) {
		this.posterProductionCompany = posterProductionCompany;
	}
	public String[] getTrailerProductionCompanyArr() {
		return trailerProductionCompanyArr;
	}
	public void setTrailerProductionCompanyArr(String[] trailerProductionCompanyArr) {
		this.trailerProductionCompanyArr = trailerProductionCompanyArr;
		this.trailerProductionCompany = convertStringArray(trailerProductionCompanyArr);
	}
	public String getTrailerProductionCompany() {
		return trailerProductionCompany;
	}
	public void setTrailerProductionCompany(String trailerProductionCompany) {
		this.trailerProductionCompany = trailerProductionCompany;
	}
	public String[] getOtherCompanyArr() {
		return otherCompanyArr;
	}
	public void setOtherCompanyArr(String[] otherCompanyArr) {
		this.otherCompanyArr = otherCompanyArr;
		this.otherCompany = convertStringArray(otherCompanyArr);
	}
	public String getOtherCompany() {
		return otherCompany;
	}
	public void setOtherCompany(String otherCompany) {
		this.otherCompany = otherCompany;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Integer getSupplement() {
		return supplement;
	}
	public void setSupplement(Integer supplement) {
		this.supplement = supplement;
	}
	public String getOnlineDate() {
		return onlineDate;
	}
	public void setOnlineDate(String onlineDate) {
		this.onlineDate = onlineDate;
	}
	public String getOfflineDate() {
		return offlineDate;
	}
	public void setOfflineDate(String offlineDate) {
		this.offlineDate = offlineDate;
	}
	public String getCollecttime() {
		return collecttime;
	}
	public void setCollecttime(String collecttime) {
		this.collecttime = collecttime;
	}
	public String getEnglishName() {
		return englishName;
	}
	public void setEnglishName(String englishName) {
		this.englishName = englishName;
	}
	public String[] getLabelArr() {
		return labelArr;
	}
	public void setLabelArr(String[] labelArr) {
		this.labelArr = labelArr;
		this.label = convertStringArray(labelArr);
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
	public String[] getAreaArr() {
		return areaArr;
	}
	public void setAreaArr(String[] areaArr) {
		this.areaArr = areaArr;
		this.area = convertStringArray(areaArr);
	}
	public String getArea() {
		return area;
	}
	public void setArea(String area) {
		this.area = area;
	}
	public String getTimeLength() {
		return timeLength;
	}
	public void setTimeLength(String timeLength) {
		this.timeLength = timeLength;
	}
	public String getPlayType() {
		return playType;
	}
	public void setPlayType(String playType) {
		this.playType = playType;
	}
	public String getShowingArea() {
		return showingArea;
	}
	public void setShowingArea(String showingArea) {
		this.showingArea = showingArea;
	}
	public String getShowingDate() {
		return showingDate;
	}
	public void setShowingDate(String showingDate) {
		this.showingDate = showingDate;
	}
	
	private String convertStringArray(String [] arr){
		
		if(null == arr){
			return null;
		}
		
		StringBuffer sb = new StringBuffer();
		
		for(String str : arr){
			if(StringUtils.isBlank(str)){
				str = "\"\"";
			}
			sb.append(SepratorUtil.SEP_COMMA_EN+str);
		}
		if(sb.toString().length()<1){
			return null;
		}
		return "{"+sb.toString().substring(1)+"}";
	}
	
	
}
